﻿using XCore.Web.Mvc;
using XCore.Dependency;
using Web.System.Utils;

namespace Web.System
{
    /// <summary>
    /// System项目基类
    /// </summary>
    public class SystemControllerBase : XCoreControllerBase
    {
        /// <summary>
        /// 日志记录
        /// </summary>
        protected SystemLogger Logger
        {
            get
            {
                return IocCollection.Resolve<SystemLogger>();
            }
        }
        /// <summary>
        /// 当前登录管理员信息
        /// </summary>
        protected SystemSession Session
        {
            get
            {
                return IocCollection.Resolve<SystemSession>();
            }
        }
        /// <summary>
        /// 日志库
        /// </summary>
        protected LoggerDbContext LDC
        {
            get
            {
                return IocCollection.Resolve<LoggerDbContext>();
            }
        }
        /// <summary>
        /// 主库
        /// </summary>
        protected SystemDbContext SDC
        {
            get
            {
                return IocCollection.Resolve<SystemDbContext>();
            }
        }
    }
}
